{% load paginator %}
<!DOCTYPE html 
	PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
	<title>{% block title %}Beastly{% endblock %}</title>
	<link rel="stylesheet" type="text/css" media="screen" href="{{ media_url }}beastly/css/base.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="{{ media_url }}beastly/css/footer.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="{{ media_url }}beastly/css/header.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="{{ media_url }}beastly/css/tables.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="{{ media_url }}beastly/css/editbox.css" />
	{% block extrastyle %}{% endblock %}
	{% block extrahead %}{% endblock %}
</head>

<body>
	<div id="header">
	{% block header %}
	<ul class="user_options">
	    {% if user.is_authenticated %}
	    <span class="welcome">Welcome {{ user.username }}</span> |
	    {% endif %}
		<li><a href="/beastly/users/">users</a></li><span class="sep"> | </span>
		{% if user.is_authenticated %}
		<li><a href="/accounts/logout/">logout</a></li><span class="sep"> | </span>
		<li><a href="/settings/">settings</a></li>
		{% else %}
		<li><a href="/accounts/register/">register</a></li><span class="sep"> | </span>
		<li><a href="/accounts/login/">login</a></li>
		{% endif %}
	</ul>
	<h1 class="name"><a href="/beastly/">Beastly</a></h1>
	{% endblock %}
	</div>

	<div id="container">
		<div id="content">
			{% block bread_crumb %}
			<div id="bread_crumb">
			<a href="/beastly/">Forum</a><span class="sep"> / </span>
			{% if forum %}
			<a href="/beastly/forums/{{ forum.id }}/">{{ forum.title }}</a><span class="sep"> / </span>
				{% if topic %}
					<a href="/beastly/forums/{{ forum.id }}/topics/{{ topic.id }}/">{{ topic.title }}</a><span class="sep"> / </span>
				{% endif %}
			{% endif %}
			</div>
			{% endblock %}

			<div class="page_title">
			{% block page_title %}
			{% endblock %}
			</div>

			{% if is_paginated %}
				{% block pagination %}
				{% paginator 9 %}
				{% endblock %}
			{% endif %}

			{% block content %}
			{% endblock %}
			<div id="footer">
			{% block footer %}
			{% endblock %}
			</div>
		</div>
	</div>

	{% block editbox %}
	{% endblock %}
</body>
</html>
